#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
#include <string>
string addStrings(string num1, string num2) {
    int end1 = num1.size() - 1;
    int end2 = num2.size() - 1;
    int carry = 0;
    int sum = 0;
    int i = 0;
    string ret("");
    int max = end1 > end2 ? end1 + 2 : end2 + 2;
    ret.reserve(max);
    while (end1 >= 0 || end2 >= 0)
    {
        int sub1 = end1 >= 0 ? num1[end1--] - '0' : 0;
        int sub2 = end2 >= 0 ? num2[end2--] - '0' : 0;
        int sub = sub1 + sub2;
        char ch = (sub + carry)%10 + '0';
        ret.push_back(ch);
        carry = (sub+carry) / 10;
    }
    if (carry)
    {
        ret.push_back('1');
    }
    reverse(ret.begin(), ret.end());


    return ret;
}


int is(char& ch)
{
    if (ch >= 'A' && ch <= 'Z')
    {
        ch += 32;
        return 1;
    }
    if (ch >= 'a' && ch <= 'z')
    {
        return 1;
    }
    return 0;
}
bool isPalindrome(string s) {
    int begin = 0;
    int end = s.size() - 1;
    if (end == 0)
        return true;
    while (begin < end)
    {
        while (begin < end && !is(s[begin]))
        {
            begin++;
        }
        while (begin < end && !is(s[end]))
        {
            end--;
        }
        if (s[begin] != s[end])
            return false;
        begin++;
        end--;
    }
    return true;
}
int main()
{
    string ret = addStrings("99", "9");
    cout << ret << endl;
    if (isPalindrome("A man, a plan, a canal: Panama"))
        cout << "yes" << endl;
    else
        cout << "no" << endl;
    return 0;
}